import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import store from './store'
import {Provider} from 'react-redux'

/**
 * 为React注入stroe
 *  react-redux负责把Redux和React连接起来，内置了Provider组件
 *  通过store参数把创建好的store实例注入到应用中，链接正式建立
 */
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
    /**注入 */
    <Provider store={store}>
        <App />
    </Provider>
);


